import api from './api'

// 综合搜索（歌曲、歌手、专辑）
export const searchAll = (keywords, type = -1, pageNum = 1, pageSize = 20) => {
  return api.get('/search', {
    params: {
      keywords,
      type,
      pageNum,
      pageSize
    }
  })
}

// 搜索歌曲
export const searchSongs = (keywords, pageNum = 1, pageSize = 20) => {
  return api.get('/song/search', {
    params: {
      keywords,
      pageNum,
      pageSize
    }
  })
}

// 搜索歌手
export const searchSingers = (keywords, pageNum = 1, pageSize = 20) => {
  return api.get('/singer/search', {
    params: {
      keywords,
      pageNum,
      pageSize
    }
  })
}

// 搜索专辑
export const searchAlbums = (keywords, pageNum = 1, pageSize = 20) => {
  return api.get('/search/albums', {
    params: {
      keywords,
      pageNum,
      pageSize
    }
  })
}
